package com.danger.Activity;

import android.widget.EditText;

import com.andreabaccega.formedittextvalidator.Validator;

/**
 * Created by 俊 on 2016/5/22.
 */
public class MyValidator extends Validator {


    public MyValidator(String message) {
        super("The " + message + " should be 8 to 15");
    }

    @Override
    public boolean isValid(EditText et) {
        int count = et.getText().length();
        return count >= 8 && count <= 15 ? true : false;
    }
}
